package br.ucb.sigplan.enuns;

public enum DiasSemanaEnum {
	MONDAY ("segunda-feira",2), 
	TUESDAY ("terca-feira",3), 
	WEDNESDAY ("quarta-feira",4), 
	THURSDAY ("quinta-feira",5),
	FRIDAY ("sexta-feira",6), 
	SATURDAY ("sabado",7); 
	
	private String extenso;
	private Integer value;
	
	private DiasSemanaEnum(String extenso, Integer value) {
		setExtenso(extenso);
		setValue(value);
	}

	public static DiasSemanaEnum findByValue(Integer value) {
		for (DiasSemanaEnum semanaEnum : values()) {
			if (semanaEnum.getValue().equals(value)) {
				return semanaEnum;
			}
		}
		return null;
	}

	public String getExtenso() {
		return extenso;
	}

	public void setExtenso(String extenso) {
		this.extenso = extenso;
	}

	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}
}
